package com.zjol

/**
  * Created by Administrator on 2017/3/27.
  */
class Outer(val name:String) { outer=>
  class  Inner(val name:String){
    def foo(b:Inner)=println("Outer:"+outer.name+" inner "+b.name)
  }

}

object OOPInscala{
  def main(args: Array[String]): Unit = {


    val outer=new Outer("Spark")
    val outer2=new Outer("Hadoop")
    val inner=new outer.Inner("Scala")
    val inner2=new outer2.Inner("java")

    inner.foo(inner)
    inner2.foo(inner2)
  }
}
